﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional

namespace EM.Migrations
{
    /// <inheritdoc />
    public partial class Init : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterDatabase()
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.CreateTable(
                name: "User",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
                    FirstName = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastName = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Type = table.Column<int>(type: "int", nullable: false),
                    Pay = table.Column<float>(type: "float", nullable: false),
                    Gender = table.Column<bool>(type: "tinyint(1)", nullable: false),
                    Age = table.Column<int>(type: "int", nullable: false),
                    AddTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
                    DimissionTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
                    HolidayTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
                    AA005 = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    AA006 = table.Column<string>(type: "varchar(150)", maxLength: 150, nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_User", x => x.Id);
                })
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.InsertData(
                table: "User",
                columns: new[] { "Id", "AddTime", "Age", "DimissionTime", "AA006", "FirstName", "Gender", "HolidayTime", "LastName", "Pay", "AA005", "Type" },
                values: new object[,]
                {
                    { new Guid("0444f27a-6ae6-44a7-bfa7-6116bd141d37"), new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), 16, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "admin@admin.com", "张", true, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "三", 0f, "123456789", 0 },
                    { new Guid("edb89627-4832-46eb-923a-48b5ee6e6b9b"), new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), 21, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "lisi@admin.com", "李", false, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "四", 0f, "987321456", 0 }
                });
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "User");
        }
    }
}
